<?
	if (!isset($mvc)) die('MVC not found');
	
	$table = new c_table_model($mvc->parse('{dbpref}views'));
	print_r($table->fields);
	
	$table->comment = 'Table of views';
	$table->set_field('id', 'int');
	$table->set_field('table_name', 'varchar', 250);
	$table->set_field('view_sql', 'text');
	$table->set_field('view_name', 'varchar', 250);
	$table->set_field('view_title', 'varchar', 250);	
	$table->set_field('allow_empty', 'int');
	$table->set_field('visible', 'int');
	$table->set_field('prev_view', 'varchar', 100);
	$table->set_field('next_view', 'varchar', 100);
	$table->set_field('tpl', 'text');
	$table->save();
	
	echo '<pre>';
	print_r($mvc->messages);
?>